home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A.C.E. 3
/
ACE CD 3.iso
/
files
/
docs
/
hyperc2.lha
/
Hypercache.doc2
< prev
next >
Wrap
Text File
|
1994-11-27
|
28KB
|
666 lines
______________ ___ ________________. ___________ ____
/o . / . o\/ oV \_____ o\ p| / _____) o\/ /
/ |\__/o /| / o| o.) / | __/o .__)_|\_ _/
\ :/o \ \: \ \_/ | .___/| :/ o\ |o |/ o\
\_______\_______\___|___:___| |________\_______/___/\___\KZ
P-R-E-S-E-N-T-S
HyperCache Professional Manual
Table Of Contents
Typed by JATNPAKY
1.0 Introduction.......................................2
1.1 System Requirements................................2
2.0 Installation.......................................3
3.0 Usage..............................................3
3.1 Configuration and options..........................4
3.11 Setting the Volume Name (-v)..................5
3.12 Changing The Cache Size Geometry (-l,-s,-p)...5
3.13 Getting a Summary of Cache Statistics (-i)....7
3.14 Removing HyperCache...........................8
3.2 HyperCache vs. Addbuffers..........................8
3.3 Benchmark Programs.................................10
4.0 HypeCache Error Messages...........................11
5.0 Drive Fraagmentation and Poor Performance..........12
6.0 Trouble Shooting/Common Questions..................13
6.1 Technical Support..................................15
p. 2
1.0 INTRODUCTION
HyperCache Professional is a file system and device accelerator unlike
any currently available for the Amiga personal computer system. It greatly
improves the performance of not only hard and floppy disks, but also of
CD-Rom and SCSI tape systems. Performance increases of up to 2200% are
attainable through HyperCache's intelligent caching system and its abliliy
to anticipate the demands placed upon the storage devices attached to your
Amiga.
From a technical standpoint, HypeCache is an "N-way associative look-ahead
cache system" for any block accessible device. It employs a method of
cache preservation called the LRU algorithm, which is normally used on mini
and mainframe computers for high-performance virtual memory systems. Apart
from its unique ability to arbitrate among cached information blocks, it
also performs an intelligent pre-fetch technique, reading data before your
application requests it.
While the high-performance caching scheme provides unmatched benefits for
porfessionals performing tasks such as large compilations, ray-tracing,
database management, and other disk-intensive tasks, the pre-fetch
algorithm significantly improves performance for even the most casual user,
through both the Shell and the Workbench interfaces. HyperCache can
provide these benefits in a minimal amount of memory, yet allows the
"power-user" to configure the system for even greater performance where
more memory is available.
1.1 SYSTEM REQUIREMENTS
In order to use HyperCache, the following are required:
* An Amiga Personal Computer
* KickStart and Workbench versions 1.2 or greater
* 512K of RAM (1M is recommended)
Providing more memory to HyperCache will increase the performacnce
benefits.
-----------------------------------------------------------------------------
P 3
2.0 INSTALLATIONS
Although it is possible to run HyperCache from the floppy it is supplied on,
you will likely want to copy it to your system disk. You may copy it to
your C: directory or any other directory in your search path. To do so,
double click on your Shell or CLI icon on your Workbench disk. When the
window opens, enter the copy commands as shown below (you may wish to
change the destination, in this case C:, to reflect your own personal
setup). The following example assumes that you have inserted the
HyperCache distribution diskette into your DF0: drive.
copy df0:hyperCache c:HyperCache
copy df0:summary c:summary
If you are working from a single drive system with no hard drive, you may
be asked to swap disks a few times to complete the copy process.
Users with a 68030 or 68040 system (such as the Amiga 3000 and 4000, or
any Amiga with a suitable accelerator board) will want to use the specially
supplied 68030 version of software. It can be installed in the following
manner:
copy df0:HyperCache030 c:HyperCache030
copy df0:Summary c:Summary
The examples that follow in the manual refer to the command "HyperCache".
whereas you would now replace this with "HyperCache030".
3.0 USAGE
To use HyperCache, invoke it from the Shell or CLI, or place it in your
S:Startup-Sequence file (not required).
NOTE: Users of Workbench 2.0 or greater may wish to place it in their
s:User-Startup file, although placing it in the s:Startup-Sequence may
decrease system startup time.
-----------------------------------------------------------------------------
p 4
HyperCache accepts a number of parameters. The most important is the name
of an AmigaDOS volume on the devise unit you wish to cache (example:DH0).
To set up a default 512K cache on your DH0: drive, use the following:
HyperCache -v DH0
If you wish to cache a different devise unit, supply any volume name from
that unit in place of "DH0" in the above example. Since HyperCache always
caches the entire devise, and not just one partition, you only need to
cache one volume from the devise.
IMPORTANT: If you are placing HyperCache in one of your startup files,
which will enable HyperCache to start automatically when your Amiga starts,
you will want to add the -n flag as shown below. This will prevent
HyperCache from producing any output, and will allow the initial CLI window
to close normally.
HyperCache -v DH0 -n
3.1 CONFIGURATION AND OPTIONS
HyperCache supports a number of command line options that alter the size,
geometry, and behavior of the cache. These options are listed below with a
brief summary of what they control.
-v <Vol. Name> Selects the devise unit to cache
-l <linesize> Sets the number of the cache lines
-s <sets> Sets the number of cache sets
-p <prefetch> Sets the amount of sector prefetch
-i Asks for a summary of cache stats
-n Suppresses all HyperCache output
3.11 Setting the Volume Name (-v)
Each time you start a cache on an AmigaDOS devise unit, you must
supply the name of a partition or volume on that unit. If, for example,
-----------------------------------------------------------------------------
p 5
you have a hard drive with three partitions (DH0:, DH1:, TEMP:),
you may start HyperCache with any of the three volume names:
HyperCache -v DH0
HyperCache -v DH1
HyperCache -v TEMP
(The colon that normally follows the devise name is optional).
Each of these is equivalent, and any one will focre HyperCache to cache
all of the partitions on that hard drive unit. HyperCache always caches
one physical devise, so caching one floppy drive will not cache the other.
Because HyperCache is a devise cache, you cannot selectively cache only
one partition on a hard drive, but the partition you use most frequently
will automatically be allocated more of the cache.
3.12 Changing the Cache Size and Geometry (-l, -s, -p)
You may at startup specify a cache size other than the default 512K.
Each parameter you give must be an even power of two, ie: selected from
the list [2,4,8,16,32,64,128,256,512,1024...] For Example, to set
up a cache with 8 sets, a linesize of 16, and a prefetch of 4 sectors,
you would enter:
HyperCache -v DH0 -s 8 -l 16 -p 4
Any combination of these three parameters is allowed, so they may be
given alone or in pairs also. Any parameter not supplied will assume
the default value. Thus, to force the cache to use 8 sets and assume the
defaults for the other parameters, you would enter:
HyperCache -v DH0 -s 8
Deciding on the size and geometry of your cache depends largely on
the type of work you will be doing. The following are some
guidelines that may help you in your decision:
. If you have a large number of small files, you may want to increase
the number of sets (using the -s option).
-----------------------------------------------------------------------------
p 6
. If you are working with relatively few files, but they are large, try
a bigger line size (using the -l option).
. If your drive is fragmented (that is, the files are broken up into
small sections all over the hard drive), prefetch will not be very
effective, so you may wish to reduce it (using the -p option). If
your drive is not fragmented, increasing it may increase performance.
Be sure to see the next section, on volume fragmentation.
When in doubt, stay close to the default values, as they have been
chosen to be optimal in most situations.
The number of "sets" (-s) refers to the number of caches that are
actually set up for that devise. Even though you think of it as one
large cache, HyperCache actually sets up several, in the hope that if a
sector canot be found in one, it will still be found in another. The
default setting is 8.
The amount of "prefetch" (-p) refers to the number of sectors in each
group that is read from the drive. Since it is inefficient to read
sectors one at a time, HyperCache reads sectors in groups. This also
means that if you read one sector now, and the following sectors moments
later, they are already in memory, even before your application
needed them. If you feel your hard drive may be fragmented, you may
want to reduce the amount of prefetch. If you have a fast CPU and
devise, and you are confident that your drive is not fragmented, you may
increase it. The default size of these groups is 4.
The number of "lines" (-l) is the number of sector groups in each cache.
Thus in the default configuration, there are 8 sets, each with 32 lines
(groups) of 4 sectors each, for a total of 1024 sectors in memory. Since
a sector is 512 bytes, this translates to 512K of cache memory.
In the interest of performance, HyperCache precalculates a lot of
information based on the cache size when it is first run. For this
reason, you cannot change the size of the cache without first clearing it.
Thus, if you want to change the cache size for a devise unit, first
remove HyperCache and restart with new values. (The -q quit option
-----------------------------------------------------------------------------
p 7
is explained here later). For example, to change the cache size to 8
sets, a linesize of 64, and a prefetch of 4, do the following:
HyperCache -v DH0 -q
HyperCache -v DH0 -s 8 -l 64 -p 4
If you intend to use only a small cache on one or two devises, and a
large cache on another (for example, 32K on a floppy drive and 512K on a
hard drive), you may wish to use the system-supplied Addbuffers command
instead of HyperCache for the smaller cache. HyperCache's benefits really
only become apparent with cache sizes of 64K or more in most cases.
Again, it depends on your particular system and the way you use it, so
experiment to determine what works best for you.
3.13 Getting a Summary of Cache Statistics (-i)
If you wish to see what size and geometry the cache is currently using,
or what percentage of reads have actually been found in the cache, you
may do an inquiry with the -i option. You must supply the volume name
of the cached devise so that HyperCache can determine which cache you
are referring to. For example, to get the cache information for a
cache on drive DH0, enter the following:
HyperCache -v dh0 -i
If there is no cache currently running on the devise unit you specify,
HyperCacahe will display an error message explaining that it cannot
find the cache's "information port", which simply means the cache
could not be located to do the inquiry.
If you wish to get a summary of ALL of the caches that are currently
active, you may use the additional Summary utility. Simply invoke the
command at the Shell or CLI prompt, and it will search your system's
memory for any caches and provide information on each:
-----------------------------------------------------------------------------
p 8
If no caches are found, HyperCache will tell you.
3.14 Removing HyperCache
To disable HyperCache on a devise unit, supply the volume name and
the -q ooption, which will terminate HyperCache on that unit and free
up any memory used. HyperCache will be removed only from that particular
unit; if there are other caches active on other devises, they will
continue running:
HyperCache -v DH0 -q
3.2 HYPERCACHE VS. ADDBUFFERS
The system-supplied caching system, Addbuffers, is a completely different
approach to media caching than HyperCache. Essentially, Addbuffers keeps
tract of what blocks you have read most recently, and maintain these in a
cache. For small devises, such as floppy drives, Addbuffers is often more
practical than a fully associative cache like HyperCache.
Addbuffers is primarily a filesystem cache, whereas HyperCache is a devise
cache. Therefore, the best results often comes from a combination of the
two. We recommend running an Addbuffers cache approximately 1/10 the size
of your HyperCache, but never less than 30 buffers nor more than 100.
Since normally you already have 30 Addbuffers at startup, you would only
need to add the difference. See your AmigaDOS manual for the proper usage
of the Addbuffers command.
For each set your cache contains, HyperCache builds a model of the devise
in memory. It breaks the devise into a series of lines, and each line is a
group of sectors. The size of each of these lines is dependaant on what
value you have set for your prefetch. HyperCache uses an internal
algorithm to map every real sector on your devise to one of these logical
groups in the cache. Then, whenever any one of the sectors in this group
is read, HyperCache reads all of the others as well, and builds a cache
line in memory. Later, when you need a sector read from the devise,
-----------------------------------------------------------------------------
p 9
HyperCache looks to see if the proper group is in memory. If not, it
checks the other sets. If it cannot find it, it reads it from the devise
and begins the process described above again.
How efficient a cache is depends on several factors: how quickly the
caching software can find the sector memory, how quickly it can transfer
that data to your application, and how well the cache manages the task of
deciding which sectors to keep in memory when the cache is full.
HyperCache excells at all of these, but because it reads sectors in groups,
and maintains a number of sets at the same time, it works best on large
devises such as hard drives and CD-Roms. If you plan on devoting only a
small portion of memory to the cache, it may be best to use the
Addbuffers system. If, you are willing to allocate more memory to the
cache, HyperCache's benefits become quite apparent. For floppy drives,
the minimum recommended size is 64K, although
128K works much better. To set up a 128K cache on a floppy drive, we
recommend the following settings:
HyperCache -v df0 -s 8 -l 16 -p 2
Note also that the floppy drives can be cached independantly; you only need
to cache the drive(s) you use most often.
On large devises, Addbuffers becomes inefficient. Setting up a 1 megabyte
cache with Addbuffers forces it to do a lot of searching, because it lacks
the association meathods described above. This is where HyperCache really
shines.
3.3 BENCHMARK PROGRAMS
The results you receive from the benchmark programs, which are intended to
proivide performance comparisons for your system, will vary depending on
the type of test run. How closely a program immitates the normal usage of
your system will be directly related to how relevant the benchmark provided
is.
Three of the more common devise benchmark programs are listed below, along
with a comment on their usage with HyperCache. They are not distributed
-----------------------------------------------------------------------------
p 10
with HyperCache, and with the exception SPSTransfer, their authors are not
affiliated in any way with the Silicon Prairie.
DiskSpeed (Fred Fish Disk #665)
DiskSpeed simulates usage by a series of reads and writes of varying size,
as well as file seek, scan, creation, and deletion tests. For the most
part these results are a good indicator of the type of performance you will
see both with and without HyperCache, particularly in the 256K read
category. Because HyperCache does not cache writes, they will not improve.
Indeed, since HyperCache uses write retention, write speed may even
decrease, as DiskSpeed never rereads the data it writes during this test.
Keep in mind though, that since much of your writing may be with temporary
files that are reread, a drop in write speed here may not be relevant to
the way in which you actually use your system. The results from the
included program, SCSISpeed, defeat the cache, and show the worst-case
scenario for HyperCache.
Sysinfo
Sysinfo, among its many other features, provides a good speed rating for
storage devises. The results from this test are a good indication of your
drive/controller transfer rate, but not necessarrily of real-world
computing. For a hard-drive, Sysinfo reads a section of data ranging from
7-15 megabytes, something you will likely never do. Sysinfo never reads
this piece of data more than once, and since it takes place as one huge
read, prefetch will have no effect. The results should not, therefore, be
taken as indicative of your system's performance with HyperCache.
SPSTransfer
SPSTransfer provides a graphical analysis of a devise's seek and read
performance. Developed before HyperCache by the same authors, the results
in general show the peak transfer rate both with and without the cache
enabled. Like Sysinfo, it performs a large read, which is more related to
how the hardware works than how you will use it. With SPSTransfer,
however, the head is not stepped during the read test, and transfer size
should not outstrip the cache. Note that the Seek test never performs a
-----------------------------------------------------------------------------
p 11
read, and measures the physical step speed of the devise. It will
therefore be unaffected by HyperCache.
4.0 HYPERCACHE ERROR MESSAGES
"Cannot find Cache's Information Port"
This signifies that an operation you attempted to perform on a cache, such
as getting information (-i) or removing the cache (-q) failed because the
system could not find an instance of HyperCache on the devise you
specified. Make sure that you have spelled the name of the volume
correctly, and that you actually have a cache operating on that drive.
"Could not Associate a devise with your volume name"
This will occur if HyperCache cannot find a devise driver associated with
your volume name. This usually results if you mistype the volume name when
trying to start HyperCache.
NOTE: Because the system RAM: drive is not actually an AmigaDOS "devise",
it cannot be cached. Non-volitale RAM disks such as VDO: and RAD: may be
cached, although it is not recommended.
"Error allocating memory"
This error can occur if you do not have enough memory to satisfy the needs
of the cache you are trying to set up. Because HyperCache allocates a
large number of small chunks of memory, fragmentation is usually not a
factor. The obvious solutions are to try a smaller cache, or quit other
applications to make more RAM available.
"HyperCache already active on this devise"
You cannot run HyperCache twice on the same devise unit. Because
HyperCache caches the entire devise unit whenever you cache any volume
-----------------------------------------------------------------------------
p 12
on that unit, trying to cache two partitions on the same hard drive will
produce this error.
Other errors
A number of other infrequent errors can occur, such as "Cannot Create Port"
or "Cannot Open Timer". If these errors occur consistently, even after
rebooting, contact Silicon Prairie for assistance.
5.0 DRIVE FRAGMENTATION AND POOR PERFORMANCE
HyperCache always attempts to predict what data you will need next from
your devise, and will prefetch it from the the devise automatically.
Usually this data is found immediately following the data you just read.
If, however, your volume is very fragmented, HyperCache will be reading
useless information that you will never need, and this can significantly
hurt performance.
Fragmentation occurs when large files are scattered into small pieces at
numerous places on your volume. This happens to all devises that are both
read and written to, and worsens over time. Although transparent to you,
the user, the system must jump around throughout the devise to find your
data, and HyperCache can be misled about how best to cache your data.
The easiest solution is to reduce the amount of prefetch as explained
earlier, but this is certainly not the most optimal answer. The best
solution is to "defragment" or "reorganize" your devise, which can be
accomplished with several commercial hard drive utilities. An optional
meathod that is more work, although sometimes safer and usually just as
effective, is to back up the volume, format it, and restore your data.
Note that it is not usually necesary to do any of these. If, however, you
feel the performance is not up to par, and it has been a long time since
your drive was reorganized or reformatted, it is an option you may want to
investigate.
-----------------------------------------------------------------------------
p 13
6.0 TROUBLE SHOOTING/COMMON QUESTIONS
Q. What systems will show the greatest performance gain?
A. In general, systems with fast processors and/or slow hard drives will
show the largest gains. 68000 systems could run around 800K/second,
whereas 68040 systems could run up to 5000K/second or more. In comparison,
standard speeds on the 68000 for a slow hard drive can be as low as
150K/second on a 68000 system. HyperCache offloads much of the work from
the hard drive controller to the processor.
Q. Can HyperCache damage my data?
A. No. HyperCache writes all data to the devise immediately using system
routines. Using write retention keeps the data in memory, but it is always
passed on immediately to the devise.
Q. When I upgrade from Kickstart 1.3 to 2.0, I noticed a large performance
gain. Why?
A. Under version 2.0, the system cache does not cache data other than
directory information and file location. HyperCache caches all of the data
on the devise, in a similar but more efficient manner than wa done under
version 1.3, so the increase is much more profound.
Q. Should I still use the Addbuffers command?
A. Yes, but not in quite the same way. HyperCache is most efficient when
complimented by a small system cache. A good guideline is an Addbuffers
cache 10% of the size of HyperCache cache, although rarely more than 50K
for the system cache. So, if you are running a 512K HyperCache cache, you
may want to try a 50K system cache (ie:Addbuffers 100). Even as little as
5% can be quite effective, mostly in the areas of file scanning and
deletion.
Q. Will HyperCache work with CD-ROM drives, especially CDTV?
A. As long as the devise uses FFS, OFS, or an MS-DOS filesystem, yes. If
you have a CD-ROM that uses a third party filesystem that does not seem to
work with HyperCache, we may have a special version for that devise. We
are constantly adding support for nonstandard devises, so please contact
-----------------------------------------------------------------------------
p 14
us if you have something that does not work with HyperCache.
Q. HyperCache fails to work with my controller. Why? What do I do now?
A. If your system crashed when you run HyperCache, you may have a
nonstandard controller. If you experience these problems, please contact
Silicon Prairie with details of your system configuration, including the
type of system and controller you are using. From a technical standpoint,
some controllers take shortcuts in their devise drivers, such as placing a
"branch short" instruction where a long address is required by Commodore's
standards. These deviations from the documented norms may increase
performance, but can cause HyperCache and other software to fail. We are
always trying to come up with patches and workarounds for such scenarios, so
we may have a fix waiting for you!
Q. Sometimes HyperCache fails to return about 6 bytes of memory. Why?
A. (Warning, Scary technial answer!) When HyperCache wedges into the
device read vector, it can later remove itself without any waste of
storage. In the event that two HyperCache instances are run on different
units of the same devise, the second links itself into the first. If the
first is removed before the second, the second instance would be left
linked into a non-existent cache, so the first instance leaves behind a
pointer to the devise itself. This enables the second instance to keep
operating normally. Thus, the short answer is not to be concerned about
it.
Q. After running HyperCache, I cannot close thre shell window when I exit
the shell. Also, my initial CLI window won't close when I run
HyperCache from the startup sequence.
A. HyperCache needs a place to display its output, and uses the Shell or
CLI window from which it was run for this purpose. If you want to close
the window after starting HyperCache, you should start HyperCache with the
-n option, which prevents HyperCache from locking the output window.
Example:
HyperCache -v DH0 -n
-----------------------------------------------------------------------------
p 15
If you have any other concerns, problems or suggestions...
6.1 TECHNICAL SUPPORT
Technical support is available through regular mail and electronic mail:
Mail: Silicon Prairie Software
2326 Francis Street
Regina, SK S4N 2P7
Canada
Remember, postage to Canada is generally higher than within your own
country. Please avoid delays by using sufficient postage.
Internet: plummer@hercules.cs.uregina.ca
Silicon Prairie can be reached by telephone at:
1-306-352-0358
End of File